<script type="text/javascript" src="<?php echo base_url()?>js/back_end/lib.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>js/back_end/load_menu_admin.js"></script>
<div id="content-right">
	<div id="add-product">
		<div id="sidebar-list" class="black">
			<div id="img-product" class="left white"><?php echo $title?></div>
			<div id="img-back" class="right">
				<a href="javascript:;" onclick="history.go(-1)" class="white">Quay lại trang trước </a>
			</div>
			<div class="clear"></div>
		</div>
		<form name="AdminPermission" id="AdminPermission" action="" method="POST">
			<input type="hidden" id="domain" value="<?php echo base_url()?>" />
			<div id="list-product">
				<table id="myTable" class="tablePr tablesorter" width="100%" border="0" cellspacing="0" cellpadding="0">
					<thead>
						<tr class="headerTbl">
							<td width="5%">STT</td>
							<td width="65%">Tên Menu</td>
							<td width="30%">Truy Cập</td>							
						</tr>						
					</thead>
					<?php if (!empty($admin_menu_1)){?>
						<tbody>
							<?php
								$i = 0;
								foreach($admin_menu_1->result_array() as $admin_1)
								{								
									$admin_menu2 = $this->db->get_where('admin_menu_2', array('admin_menu_1' => $admin_1['menu_admin_id']));								
									foreach ($admin_menu2->result_array() as $m)
									{									
										$PerCheck="";								 									 	
									 	$PerDisable="";								 									 									 
									 	if ($i % 2 == 0)
									 	{
									 		$bgcolor="str1";
									 	}
									 	else
									 	{
									 		$bgcolor="str2";
									 	}																						
							?>
							<tr class="<?php echo $bgcolor?>">
								<td><?php echo $i?></td>
								<td><?php echo $m['name']?></td>
								<td><a href="JavaScript:" style="text-decoration: underline; color: red;" id="permiss2" onclick="loadMenu3(<?php echo $m['id'] ?>, <?php echo $admin_id ?>);" >Gán quyền</a></td>							
							</tr>						
							<?php $i++;
									}
								}?>						
						</tbody>
					<?php }else{?>
						<tr><td colspan="3">Bạn chưa thuộc Admin_Groups nào</td></tr>
					<?php }?>
				</table>
			</div>
		</form>		
		<div id="admin_menu_3"></div>
	</div>
</div><!-- end  content-right -->	